package com.myosw.action;

import com.myosw.entity.PageShow;
import com.myosw.service.VisitlogService;
import com.myosw.util.Base64Coder;

public class VisitAction extends BaseAction {

	
	public void show() 
	{
		int pagecount=1;
		int size=10;
		String[] params = request.getParams();
		if(params!=null){
			if(params.length>0)
				pagecount = Integer.parseInt(params[0]);
			if(params.length>1)
				size = Integer.parseInt(params[1]);
		
		}
		String safeurl=request.getParameter("url");
		String url = Base64Coder.decodeUrlBase64Safe(safeurl);
		PageShow page = visitlogService.getFilters(pagecount, size, url);
		root.put("menu", "visit");
		root.put("url", url);
		root.put("safeurl", safeurl);
		root.put("page", page);
		printFreemarker("default/visitshow.ftl", root);
	}
	
	VisitlogService visitlogService = new VisitlogService();
}
